package com.qf.main.pharmacy.controller;

import com.github.pagehelper.PageInfo;
import com.qf.common.base.result.ResponseResult;
import com.qf.main.pharmacy.common.vo.StorageVo;
import com.qf.main.pharmacy.entity.UserLoginData;
import com.qf.main.pharmacy.service.UserLoginDataService;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * @author chengqiang
 * @Create 2024-03-04-19:08
 * @Description:
 */
@RestController
@RequestMapping("/user/login/data")
@CrossOrigin
@Api(tags = "登录信息")
public class UserLoginDataController {
    @Resource
    private UserLoginDataService userLoginDataService;


    @GetMapping("/save")
    public ResponseResult<Integer> save(@RequestParam(value = "userId" ,required = false) Integer userId){

        return  ResponseResult.success(userLoginDataService.saveUserLoginData(userId));
    }
    @GetMapping("/get")
    public ResponseResult<UserLoginData> get(@RequestParam(value = "userId" ,required = false) Integer userId){

        return  ResponseResult.success(userLoginDataService.getUserLoginData(userId));
    }

}
